package com.hxd.otc.common.enums;

import android.text.TextUtils;

/**
 * Created by lzy on 2018/12/19 0019.
 * description ${广告商申请状态枚举}
 */
public enum YsApplyStatusEnum {
    //    -1 ,未申请 0 ,申请中 1 ,驳回 2 ,通过 3 ,冻结
    NOT_APPLY("-1", "未申请"), APPLYING("0", "审核中"), REJECT("1", "认证失败"), PASS("2", "通过"), FREEZE("3", "冻结");

    private final String mStatus;
    private final String mDesc;

    YsApplyStatusEnum(String status, String desc) {
        mStatus = status;
        mDesc = desc;
    }

    public String getStatus() {
        return mStatus;
    }

    public String getDesc() {
        return mDesc;
    }

    public static YsApplyStatusEnum getInstance(String status) {
        if (TextUtils.isEmpty(status)) return null;
        for (YsApplyStatusEnum ysApplyStatusEnum : YsApplyStatusEnum.values()) {
            if (ysApplyStatusEnum.mStatus.equals(status)) return ysApplyStatusEnum;
        }
        return null;
    }

    @Override
    public String toString() {
        return "YsApplyStatusEnum{" +
                "mStatus='" + mStatus + '\'' +
                ", mDesc='" + mDesc + '\'' +
                '}';
    }
}
